import superRequest from '@/utils/http/index'
import { IDataType } from '@/utils/http/types'

/** 核心查询(接口) */
export const apiCoreList = async (mid: string, data: any) => {
  return await superRequest.post<IDataType>({
    url: '/core/list',
    data,
    headers: {
      'Mid': mid,
    },
  })
}

/** 核心新增(接口) */
export const apiCoreAdd = async (mid: string, data: any) => {
  return await superRequest.post<IDataType>({
    url: '/core/add',
    data,
    headers: {
      'Mid': mid,
    },
  })
}

/** 核心修改(接口) */
export const apiCoreUpdate = async (mid: string, data: any) => {
  return await superRequest.post<IDataType>({
    url: '/core/update',
    data,
    headers: {
      'Mid': mid,
    },
  })
}

/** 核心删除(接口) */
export const apiCoreDelete = async (mid: string, data: any) => {
  return await superRequest.post<IDataType>({
    url: '/core/delete',
    data,
    headers: {
      'Mid': mid,
    },
  })
}
